﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
using ZoneFiveSoftware.Common.Visuals.Fitness;
using STCommon.NUnit;

namespace STCommonUnitTests
{
    public class STCommonTestsMain : IPlugin
    {
        public STCommonTestsMain()
        {
            String testAssemblyLocation = typeof(STCommonTestsMain).Assembly.Location;

            NUnitTestManager.Instance.RegisterTestAssembly(testAssemblyLocation);
        }

#region IPlugin Members

        public IApplication Application
        {
            set { m_Application = value; }
            get { return m_Application; }
        }

        public Guid Id
        {
            get { return new Guid("bd9f8641-268c-4ba5-bfd0-3a7b409f7d2d"); }
        }

        public string Name
        {
            get { return "STCommon Unit Tests"; }
        }

        public void ReadOptions(XmlDocument xmlDoc, XmlNamespaceManager nsmgr, XmlElement pluginNode)
        {
        }

        public string Version
        {
            get { return GetType().Assembly.GetName().Version.ToString(3); }
        }

        public void WriteOptions(XmlDocument xmlDoc, XmlElement pluginNode)
        {
        }

#endregion

        public static IApplication GetApplication()
        {
            return m_Application;
        }

        private static IApplication m_Application = null;
    }
}
